﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ETL.Business.Models;
using ETL.Common.Logging;
using ETL.DataAccess;
using ETL.Entity;

namespace ETL.Business.Handlers.ProjectTimeHandler
{
    public class CheckClockOnStatus
    {
        private readonly ProjectTimeRepository _projectTimeRepository;

        public CheckClockOnStatus(ProjectTimeRepository projectTimeRepository)
        {
            _projectTimeRepository = projectTimeRepository;
        }
        public CheckClockOnStatus()
        {
            _projectTimeRepository = new ProjectTimeRepository();
        }
        public virtual bool Execute(string userId)
        {
            try
            {
                bool result = _projectTimeRepository.CheckLogOnStatus(userId);
                return result;
            }
            catch (Exception ex)
            {
                LogService.Service.Debug(ex);
                return false;
            }
        }

    }
}
